<?php
/**初始化数据
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/26/026
 * Time: 12:10
 */
require ('./cfg.php');
require ('./interface.php');
require ('./ModerHasher.php');
require ('./ConsHasher.php');
$diser = new $dis();
$mem = new memcache();

foreach ($ss as $s=>$v){
    $diser->addNode($s);
}
for ($i=1;$i<=10000;$i++){
    $key = 'key_'.$i;
    $val = 'val_'.$i;
    $num = $diser->lookup($key);
    $mem->connect($ss[$num]['host'],$ss[$num]['port']);
    $mem->add($key,$val);
    $mem->close();
}

echo 'ok\n';